home *** CD-ROM | disk | FTP | other *** search
/ More DosGames 2.0 / MORE - Dosgames 2.0 (Software Company)(1994).iso / dosgames / hedge / hedge.doc < prev    next >
Text File  |  1994-09-01  |  10KB  |  239 lines

  1. NOTE: If Hedge Row does not run, see "troubleshooting" below.
  2.  
  3.  
  4.                               Hedge Row
  5.  
  6.                      Copyright 1993 Diana Gruber
  7.  
  8. This game is one of many I have on my hard disk that I never quite finished.
  9. I am releasing it now, with source code, in the hope that some other game
  10. programmers will find it useful. Feel free to dissect and re-use this code,
  11. and write "real" games based on it.
  12.  
  13. Hedge Row has several features that make it interesting. It was my first
  14. attempt at an SVGA game. It runs in an 800x600x256 video mode, and uses two
  15. physical pages (video memory) and one logical page (EMS or XMS). In this
  16. sense, it is a resource-intensive program. Yet the EXE size is tiny and the
  17. program uses less than 100k of conventional RAM.
  18.  
  19. Another interesting feature is the recursive maze solution. This is one of
  20. those problems they love to give you in computer science classes. Students
  21. who want to turn in my code to satisfy their homework assignments have my
  22. permission to do so.
  23.  
  24. The mouse motion is also interesting. The mouse is constrained to the maze
  25. paths; it will not go off the path into illegal areas. This was hard code to
  26. write. Looking at it, it doesn't look that difficult, but I remember I had a
  27. real hard time writing it.
  28.  
  29. Running Hedgerow
  30. ----------------
  31. Just type "Hedge". Follow the simple instructions on the screen. If you get
  32. stuck, press 'F1' for help.
  33.  
  34. Cheat mode
  35. ----------
  36. Maze tile paths are drawn in two colors. The true path is drawn in palette 7,
  37. and the other paths are drawn in palette 5. Both palettes are set to white,
  38. but you can change the color of the true path by using the "cheat mode".
  39.  
  40. Press 'c' to activate the cheat mode. This will change the color of the true
  41. path from white to light blue. Pressing 'c' again will change it back. The
  42. cheat mode makes it easy to traverse the maze path, but it is not nearly as
  43. interesting as the recursive maze solution.
  44.  
  45. Recursive maze solution
  46. -----------------------
  47. Press 'r' to see an honest-to-goodness recursive maze solution. I wrote this,
  48. but don't ask me how it works. I haven't the foggiest. It works great though,
  49. doesn't it?
  50.  
  51. Next maze
  52. ---------
  53. Press 'n' to abandon the current maze and start a new one. There are seven
  54. mazes distributed with this version of the Hedge Row program. Will there ever
  55. be more? I don't know!
  56.  
  57. Exit
  58. ----
  59. Press 'ESC' to exit the program. Isn't that easy?
  60.  
  61. Troubleshooting
  62. ---------------
  63. Hedge Row requires a mouse, SVGA card and monitor, and approximately 512k of
  64. extended or expanded memory to run. If any of these are missing, Hedge Row
  65. will not work.
  66.  
  67. If you have EMS or XMS memory and Hedge Row reports that you do not, check
  68. that other programs are not using that memory. On my system, I noticed
  69. Smartdrive was eating up all my extended memory. Turn your Smartdrive off, or
  70. configure it to use less memory, so that Hedge Row can have some.
  71.  
  72. If you recompile and link this code with Fastgraph/Light and the program
  73. does not run properly, it may be because of a bug in Fastgraph/Light. This
  74. is an obscure bug in fg_tcxfer that surfaced when we were preparing this
  75. program for distribution. It only occurs in the "Light" (shareware) version
  76. of Fastgraph, not the professional version. We fixed it immediately, of
  77. course, as we do with all bugs. You can download the latest version of
  78. Fastgraph/Light from our BBS or from the Gamer's forum on CompuServe, or
  79. call us and we will send it to you. Hedge Row should work with all versions 
  80. of Fastgraph and Fastgraph/Light 3.03a and above, or any version of 
  81. fgdriver.exe with a time stamp of 10/10/93 or later.
  82.  
  83. SVGA cards
  84. ----------
  85. Hedge Row should work on most currently popular SVGA cards. It uses Fastgraph
  86. to do an autodetect on the chipset and then does direct chipset support. If
  87. it does not find a chipset it knows, it will support Super VGA through the
  88. VESA driver.
  89.  
  90. Please report any SVGA problems to Ted Gruber Software. If you have video
  91. hardware that Fastgraph does not support, we want to know about it.
  92.  
  93. Files in the distribution
  94. -------------------------
  95.  HEDGE.EXE   the program
  96.  HEDGE.DOC   this file
  97.  
  98.  HEDGE.C     source code for the game
  99.  HEDGE.H     function declarations
  100.  COMMON.C    source code for "often used" functions
  101.  COMMON.H    function declarations
  102.  DEFS.H      defines, includes and
  103.  
  104.  DUBDINER.PCX  pcx file containing picture of dub diner
  105.  HEDGE.PCX     pcx file containing maze tiles
  106.  HEDGE.ATT     attributes of maze tiles (open on left, right, top, etc.)
  107.  
  108.  
  109.  MAZE001.LEV  \
  110.  MAZE002.LEV   \
  111.  MAZE003.LEV    \
  112.  MAZE004.LEV      maze data for 7 different mazes
  113.  MAZE005.LEV    /
  114.  MAZE006.LEV   /
  115.  MAZE007.LEV  /
  116.  
  117. Compiling and linking
  118. ---------------------
  119. Hedge Row requires Fastgraph 3.00 or above, or Fastgraph/Light 3.03 or above
  120. to link. You can download Fastgraph/Light from our BBS at (702) 796-7134, or
  121. look on CompuServe in the Gamers forum.
  122.  
  123. I used the medium model to compile. The following commands show the
  124. compilation and linking sequences for each supported compiler:
  125.  
  126.    Borland C++     BCC -mm HEDGE.C COMMON.C FGM.LIB
  127.  
  128.    Microsoft C     CL /AM HEDGE.C COMMON.C /link FGM.LIB /STACK:6144 /E
  129.  
  130.    QuickC          QCL /AM HEDGE.C COMMON.C /link FGM.LIB /STACK:6144 /E
  131.  
  132.    Turbo C/C++     TCC -mm HEDGE.C COMMON.C FGM.LIB
  133.  
  134.    Zortech C++     ZTC -mm HEDGE.C COMMON.C FGM.LIB
  135.  
  136. If you are linking with Fastgraph/Light, replace FGM.LIB with FGLM.LIB. When
  137. using Fastgraph/Light, the FGDRIVER.EXE video driver must be version 3.03A or
  138. later.
  139.  
  140. Stack considerations
  141. --------------------
  142. The recursive solution requires an increased stack size. The more vertices in
  143. the maze, the bigger stack you need. I increased the stack size by adding
  144. this to the Microsoft link command: /STACK:6144. This stack is big enough for
  145. most standard mazes. A really complicated maze would need a bigger stack.
  146.  
  147. Maze #7 has the most vertices.
  148.  
  149. How maze tiles work
  150. -------------------
  151. The tiles are 16x16 pixel rectangles, stored in the file HEDGE.PCX. Each
  152. tile represents a possible maze path: up and down, left to right, branch in 2
  153. or 3 directions, etc. They are numbered starting at 0 in the upper left
  154. corner, through 239 in the lower right. Not all the tiles are needed in the
  155. maze game, there are a bunch of "blank" tiles.
  156.  
  157. The layout array is defined like this:
  158.  
  159.    unsigned char layout[50][38];
  160.  
  161. It is a two dimensional array corresponding to the positions of the tiles on
  162. the SVGA screen. 50 tiles x 16 pixels = 800 pixels total, which is the
  163. horizontal resolution of the screen. Similarly, the vertical resolution is
  164. 600 pixels, or 38 tiles x 16 pixels.
  165.  
  166. Tiles are stored on the hidden page and transferred to the visual page using
  167. fg_tcxfer. Color 0 is the transparent color, so the tiles can be superimposed
  168. on the DUBDINER.PCX picture without completely covering it.
  169.  
  170. Meanwhile, a clean copy of the dubdiner picture is stored offscreen on a
  171. logical page in EMS or XMS memory. When a new maze is drawn, the picture is
  172. copied to the visual page and a new sequence of tiles is drawn over it.
  173.  
  174. What I would add to Hedge Row to make it a real game
  175. ----------------------------------------------------
  176. For one thing, I would create a better intro screen. Also, I would use better
  177. fonts. The reason I used the ROM font is so you can link with the shareware
  178. version of Fastgraph. It would look better if I used Fastgraph/Fonts.
  179.  
  180. Also, I would generate about 100 more mazes. This is the main reason I never
  181. finished the program. Those mazes take a long time to create, and they get
  182. boring after a while.
  183.  
  184. I wrote some maze generation code, but the mazes were not attractive. In my
  185. opinion, mazes that have repetitious patterns look prettier. The computer-
  186. generated mazes were too random.
  187.  
  188. I would also add some challenges, such as a timer, some traps (quicksand?),
  189. monsters, and items such as hidden walls, secret keys, etc. I think it would
  190. be an interesting game if I had done those things, but I never got around to
  191. it...my hard disk is littered with half-finished games.
  192.  
  193. About dub diner
  194. ---------------
  195. The background picture, DUBDINER.PCX, was done by those great guys over at
  196. dub Media. Dub Media is dedicated to providing quality computer graphics to
  197. meet your needs and budget. Whether your reuqirements are VGA-resolution
  198. still images or broadcast-quality animation, dub Media can offer a creative
  199. alternative.
  200.  
  201. Dub Media sent me the diner file in a GIF format, but I converted it to a PCX
  202. file so my users can recompile and relink the source code with
  203. Fastgraph/Light. I also reorganized the palette colors a little so my maze
  204. path would be red and white. For an original of the dubdiner GIF, and
  205. information about other art, you can contact Alfred Woo and Mike Wall at:
  206.  
  207.   dub Media
  208.   75 Trapelo Road
  209.   Waltham, MA 02154
  210.   (617) 647-1101
  211.  
  212. About Fastgraph
  213. ---------------
  214. Fastgraph is a graphics library. You use it to write games. You can download
  215. the shareware version, or if you call me, I will mail it to you, along with
  216. more information, an order form and current prices.
  217.  
  218. Distribution permission
  219. -----------------------
  220. This program is being distributed primarily for Fastgraph users to use as an
  221. example to help them learn about Fastgraph. It is not a shareware program,
  222. and is not appropriate for vendor catalogs, retail sales, or CD-ROM
  223. distribution. This program may be distributed via bulletin boards and online
  224. services such as CompuServe. You may make copies of this program and give it
  225. to your friends as long as you don't charge them money for it. Any other type
  226. of distribution is prohibited unless you have written permission from the
  227. author.
  228.  
  229. Contacting the author
  230. ---------------------
  231.  
  232. Diana Gruber
  233. Ted Gruber Software
  234. PO Box 13408
  235. Las Vegas, NV  89112
  236. (702) 735-1980 (voice)
  237. (702) 796-7134 (bbs)
  238. (702) 735-4603 (fax)
  239.